package com.yuan.kafkastudy.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.kafka.common.protocol.types.Field;

import javax.swing.*;
import java.util.List;
import java.util.Map;

@Mapper
public interface PlatformMapper {
    @Select("select id from kafkareserve.platform where platform_name like CONCAT(#{platform_name}, '%')")
    List<String> selectId(@Param("platform_name") String platform_name);

   void insertPlatform(@Param("id") String id,@Param("platform_id") String platform_id,
                       @Param("comm_name") String comm_name, @Param("comm_type")String comm_type,
                       @Param("sensor_name") String sensor_name, @Param("sensor_type") String sensor_type);


   @Select("select comm_name,comm_type,sensor_name,sensor_type,platform_number from kafkareserve.platform_part where id = #{id}")
   Map<String,Object> selectM(@Param("id")  String id);
}
